# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-logs
pkgver=43.0
pkgrel=1
pkgdesc="A log viewer for the systemd journal"
url="https://wiki.gnome.org/Apps/Logs"
arch=(x86_64)
license=(GPL)
depends=(systemd gtk4 libadwaita gsettings-desktop-schemas)
makedepends=(appstream-glib git meson yelp-tools)
groups=(gnome)
options=(debug)
_commit=3fa0b8a7f734e6adf865cc5df673f6a74809b56d  # tags/43.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-logs.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^gnome-logs-//;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  local meson_options=(
    -D man=true
  )

  arch-meson $pkgname build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
